home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
088
/
wcdos13.arc
/
CDMON.DOC
< prev
next >
Wrap
Text File
|
1985-12-01
|
8KB
|
204 lines
1 December, 1985
Merry Christmas from 102/1101!
- New Version of CDMON -
====================
The current revision level of CDMON is v 1.10. That's what
is included in this ARChived package. Updates have also been
made to the documentation. If you have the need to, send
hate mail, flames,etc. to me at the address mentioned below.
The v 1.10 CDMON is command line configurable. That makes life
a little easier for most SYSOPs if their systems are normally in
a state of transition (as mine is). In any case, command line
arguments should have been included in the original; here they
are!
Also included in this ARC is a small program called '5SALARM'. It
is used to count down the 5 seconds before warm boot if you ctrl-c
out of Fido or have an abnormal errorlevel on exit. Read the docs
on how to set up your AUTOEXEC or BBS batch files for more details.
- What to use CDMON for -
=====================
CDMON was designed primarily as a carrier detect monitor
program for safety after execution of the SYSOP '0' command.
The Fido '0' command allows a user with SYSOP
priveleges to exit from Fido with ERRORLEVEL set to the
value specified by the command line '/W' parameters. The
effect then is that the user is now connected thru the
modem to the computer.
Even though the user is physically connected thru the
switched network to the computer, the computer doesn't
even know he's there yet. A couple of things must be
done before the user can communicate at the DOS level.
1. A logical connection must be made from the COM port
to the console I/O device. The DOS 'CTTY' command
will suit our purpose here.
2. While the console I/O is redirected to the modem COM
port, we must make sure that no one other than the SYSOP
user (the one currently connected) can gain access to
the system at the DOS level. This might be a major
reason that so few SYSOP's use the '0' command for
remote access. The only was to assure that no other
users can connect to the modem is to allow only one
use of the '0' command per Fido session. That is, if
carrier drops after the SYSOP has executed the '0',
then the system either resets or restarts Fido. This
is the method used to prevent unauthorized access thru
the DOS prompt.
- Great! What does CDMON do then (you might ask) -
==============================================
Initialization
CDMON is installed as a KEEP process, that is, always resident
once invoked. CDMON installs its own vector into the AUX timer
interrupt vector (interrupt 1CH). After the vector is set up,
CDMON does a special exit to DOS, allowing DOS to keep it in RAM.
The previous contents of the AUX timer vector are preserved and
that entry point is invoked using a far call if INT 1CH is invoked
thereafter. The use of the AUX timer vector allows CDMON to
get control periodically.
Execution
Now CDMON gets control every 54.9 milliseconds from the system
clock routine in ROM (AUX timer). Every 'tick', the modem status
register is sampled for the DCD (Data carrier detect) signal. If the
signal has gone inactive, it means that for some reason, the
call originator has stopped sending carrier. This really means
that the sender has either disconnected or has lost the phone line.
CDMON waits for this condition to be true for a some time
(depending on how you set it up) and then executes a warm boot.
If DCD picks up again within the 'window time', then the count is
reset and operation continues as before. The 'window time' is set
to about 270 millseconds in the source file attached. It is suggsested
that you set this time to a VERY low value. It is unlikely with
modern 'intelligent' modems that you'd need any timeout at all, but
the timer is available so that if you're using a modem which does
not time out carrier drop itself, CDMON can wait to see if DCD
activates again in that interval.
How to set parameters for CDMON
===============================
1. CDMON v 1.1 is configurable from the command line invoking it.
The program accepts the following command line format:
CDMON C/p M/m T/t
where p = either '1' or '2', indicating COM1 or COM2
m = DCD mask from 1 to 128, same as for good old Fido
limit is 255
t = DCD drop timer value in 55 mS increments
limit is 255 (which would be about 14 Seconds ...).
To change the default parameters (only if you REALLY need to).
=============================================================
1. Find the following variables in the CDMON.ASM source and alter
the default values according to your needs.
msr - the I/O port address of the Modem Status Register
3FEH for COM1, 2FEH for COM2. Non-IBM users may
need other ports for the MSR default. MSR1 and MSR2
are supplied.
DCD - the default bit mask for the DCD signal in the Modem Status Register.
128 - for Hayes and compatible modems.
32 - can be used (DSR) in modems which do not correctly
support the DCD signal (like the modem I was using).
You may want to experiment if you're not sure of which bit in
the MSR is the DCD bit. You only have to try 8 times !
TIMEOUT - the default window interval in milliseconds.
Suggested value of 1 for modems which condition DCD.
Set to 100 mS to 1500 mS for modems which do not.
2. Assemble / Link / LTL the program.
It is suggested that you use MASM 2.0 as your assembler.
masm cdmon,cdmon,cdmon,cdmon; assemble it.
link cdmon,cdmon; link it.
exe2bin cdmon cdmon.com; make it a .COM file.
3. How to set up your Fido batch file for use with CDMON.
Shown below is a sample 'auto' batch file which allows safe
use of the '0' command from Fido to get to the DOS prompt.
; the AUIOEXEC.BAT file:
path c:\;c: .... whatever
CD FIDO
FIDO_IBM 32/V /Y 100/L 100/F 100/D 150/K 5/w ; 5/w causes ERRORLEVEL 5
; to occur on EXIT from FIDO
; after the '0' command is done.
IF ERRORLEVEL 5 GOTO CHECKIN
; abnormal exit path.
5SALARM ; count down the warm boot in
; seconds like 5..4..3..2,etc.
; if you don't hit a key, the
; system will warm boot.
:CHECKIN ; '0' command exit path.
cdmon c/1 m/128 t/10 ; invoke CD Monitor with these
; args: COM1, DCD mask = 128,
; 550 mS DCD timeout.
CTTY COM1 ; redirect all CONsole I/O to COM1.
; the system will warm boot if
; DCD is lost for 550 mS.
Remarks -
=======
The files contained in this ARC are:
CDMON.ASM - the assembly language source file.
CDMON.COM - the CDMON command (defaults for my machine).
CDMON.DOC - this doc file.
RESET.COM - a 'reset' command you can use remotely to restart
your system. Invoke it on your Fido machine
when you're ready to disconnect.
5SALARM.COM - 5 second warm boot alarm in the the event of abnormal
exit from Fido (like ^C'ing or disk full).
Waits for a keystroke within 5 seconds, else it warm
boots the system.
I probably don't need to mention that you should be running ANSI.SYS
as your terminal driver (or something compatible). I use some ANSI
strings in both programs ... ANYWAY, please use ANSI.SYS !!
I know of a couple other DCD monitor programs out there in Fido-land.
'WATCHDG1' comes to mind first. I don't believe that program has
any DCD conditioning. You might try CDMON as an alternative !!
Don't forget to set the source file constants up for your environment
before you install CDMON. The constants in the attached source are
the ones I'm using here at Zaphod's Node. They work fine for me. My
Fido is set up with a U.S. Robotics Courier 2400 modem on COM1.
Please direct inquiries to:
Matthew Zilmer
Fido 102/1101
919 W. Baseline Rd.
Claremont, CA. 91711-1508 Data phone: 714-626-1843